#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "libavstream.h"

/*
main函数
*/
int main()
{
	printf("h264 stream test!\n");
	int i = 0;
	video_frame_info video_info;
	h264_stream_init();
	while(i < 53)
	{
		h264_stream_get(&video_info);
		printf("frame_type:%d frame_len:%d \n", video_info.frame_type, video_info.frame_len);
		//if(video_info.frame_type == I_FRAME)
		{
			int j = 0, k = 0;
			for(j = 0; j < 25; j++)
			{
				for(k = 0; k < 32; k++)
				{
					unsigned char data = (int)video_info.pframe_data[j*32 + k];
					printf("%02x ", data);
				}
				printf("\n");
			}
		}

		i++;
	}

	h264_stream_deinit();
	return 0;
}
